<template>
	<view class="container">
		<view class="top">
			<input @input="titleValue" maxlength="10" class="title" type="text" placeholder="标题">
			<uni-icons v-if="bText!=null && bTitle!=null" @click="submit" type="checkbox" size="40" color="#ef5e26"></uni-icons>
			<uni-icons v-else type="checkbox" size="40" color="#6f6f6f"></uni-icons>
		</view>
		<view class="time">今天{{nowtime}}</view>
		<textarea class="bigtext" @input="bindTextAreaBlur" maxlength="300"></textarea>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				nowtime: '',
				DataTime: '', //存数据库时间
				bText: null,
				bTitle:null
			}
		},
		onShow() {
			let time = new Date()
			this.nowtime = time.toLocaleTimeString()
			this.DataTime = time.toLocaleDateString()
		},
		methods: {
			bindTextAreaBlur: function(e) {
				this.bText = e.detail.value
				console.log(this.bText)
			},
			titleValue(e) {
				this.bTitle = e.detail.value
				console.log(this.bTitle)
			},
			submit(){
				
				
				uni.navigateBack(1)
			}
		}
	}
</script>

<style>
	.container {
		width: 710rpx;
		margin: 0 auto;
	}

	.top {
		width: 100%; 
		display: flex;
	}
	uni-icons{
		margin-top: 18rpx;
	}

	.title {
		width: 85%;
		line-height: 100rpx;
		height: 100rpx;
		font-size: 40rpx; 
	}

	.bigtext {
		width: 100%;
		min-height: 620rpx;
		line-height: 50rpx; 
	}

	.time {
		font-size: 28rpx;
		color: #6f6f6f;
		margin-bottom: 30rpx;
	}
</style>
